package com.sztle.admodule.bean;

import androidx.annotation.Keep;

@Keep
public class RequestAdEntity {

    //请求广告加载的对象，用于限制10s 50次
    public static final int TYPE_AD_SPLASH = 0;
    public static final int TYPE_AD_INT = 1;
    public static final int TYPE_AD_REWARD = 2;
    public static final int TYPE_AD_NATIVE = 3;

    public long requestLoadTime = 0;
    public int requestAdType = 0;
    public String adCode = "";

    public RequestAdEntity() {
        requestLoadTime = System.currentTimeMillis();
    }

    public RequestAdEntity(int adType) {
        requestAdType = adType;
        requestLoadTime = System.currentTimeMillis();
    }

    public RequestAdEntity(int adType, String code) {
        requestAdType = adType;
        adCode = code;
        requestLoadTime = System.currentTimeMillis();
    }

    public String getAdName(){
        if(requestAdType == TYPE_AD_SPLASH){
            return "开屏";
        } else if(requestAdType == TYPE_AD_INT){
            return "插屏";
        } else if (requestAdType == TYPE_AD_REWARD) {
            return "激励";
        }else if (requestAdType == TYPE_AD_NATIVE) {
            return "原生";
        }
        return "开屏";
    }
}
